//
// Created by xili on 2024/8/21 15:37.
// GO BIG OR GO HOME.
//
#include <leetcode.h>

class Solution {
public:

    // Encodes a URL to a shortened URL.
    string encode(string longUrl) {
        for (auto &item: longUrl) {
            item += 1;
        }
        return longUrl;
    }

    // Decodes a shortened URL to its original URL.
    string decode(string shortUrl) {
        for (auto &item: shortUrl) {
            item -= 1;
        }
        return shortUrl;
    }
};

// Your Solution object will be instantiated and called as such:
// Solution solution;
// solution.decode(solution.encode(url));